const recipeApi = require('../api/recipe')
const allServices = require('../db');

const start = 106572599
const end = 106572596
// const end = 106500000
const insertRecipe = async () => {
  for(let code = start; code >= end; code--) {
    console.log(code)
    await recipeApi(code)
  }
  allServices.closePool(`数据插入完成${start}-${end}`)
}


module.exports = insertRecipe